<template>
  <Dialog ref="dialog" width="700" :title="titleinfo">
    <div class="titleInfo">
      <div class="headerName">15295320125</div>
      <div class="headerSize">{{ titleContent }}</div>
      <div class="headerSize" style="margin-top: 12px">
        (需要扣除客单费
        <el-icon color="#ff7d00">
          <WarningFilled />
        </el-icon>
        <span style="color: #ff7d00"> ￥50 </span>)
      </div>
    </div>
    <el-divider />
    <div class="right">
      <el-button>取消</el-button>
      <el-button type="primary" @click="closeChange">确定</el-button>
    </div>
  </Dialog>
</template>
<script setup>
import Dialog from '@/components/Dialog/Dialog.vue';
import { ref } from 'vue';

const dialog = ref('');
const titleinfo = ref('');
const titleContent = ref('');

function openChange(val) {
  dialog.value.openChange();
  if (val == 0) {
    titleinfo.value = '开通志愿卡';
    titleContent.value = '确认要开通志愿卡吗？';
  } else {
    titleinfo.value = '开通升学卡';
    titleContent.value = '确认要开通升学卡吗？';
  }
}

function closeChange() {
  dialog.value.closeChange();
}

defineExpose({
  openChange,
});
</script>
<style lang="scss" scoped>
.titleInfo {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  .headerName {
    font-size: 18px;
  }

  .headerSize {
    font-size: 16px;
    text-align: center;
    display: flex;
    align-items: center;
  }
}
</style>
